package cn.sundat.dao;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import cn.sundat.model.Product;

public class ProductDaoImpl extends BaseDaoImpl<Product> implements ProductDao {

	@Override
	public Product findByName(DetachedCriteria criteria) {
		List<Product> list = (List<Product>) this.getHibernateTemplate().findByCriteria(criteria);
		if(list!=null && list.size()>0) {
			return list.get(0);
		}
		return null;
	}
	
}
